import Vue from 'vue'
import Router from 'vue-router'
import home from '@/views/home' // home文件夹下只放home页面
import login from '@/views/login' 
import notFound from '@/views/notFound'
import personal from '@/views/personal';
import toService from '../views/toService';
import toControl from '../views/toControl';

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'login',
            component: login,
            meta: {
                auth:true
            }
        },
        {
            path: '/home',
            name: 'home',
            component: home,
        },
        {
            path: '/personal',
            name: 'personal',
            component: personal,
        },
        {
            path: '/toService',
            name: 'toService',
            component: toService,
        },
        {
            path: '/toControl',
            name: 'toControl',
            component: toControl,
        },
        {
            path: '*',
            component: notFound,
        },
    ],
    mode: 'history'
})
